<?php 
	echo $html->css( 'jquery-ui-1.8.16.custom.css' );
	$javascript->link( array( 'jquery/jquery-1-6-4', 'jquery/jquery-ui-1.8.16.custom.min', 'projects/index' ), false );
?>

<h1>Mis Carpetas</h1>

<div id="listTeams">
	<?php foreach( $listProject['Category'] as $listCategory ) : ?>
		<div class="project">
			<?php echo $html->link( 'x', array( 'action' => 'deleteCategory', $listCategory['id'] ), array( 'class' => 'deleteSchedule' ), null, null, 'Estas seguro de que deseas eliminar esta carpeta ?' ) ?>
			<?php echo $html->image( 'folder.png' ); ?>
			<p><b><?php echo $html->link( $listCategory['name'], array( 'controller' => 'categories', 'action' => 'view', $listCategory['id'] ), array( 'title' => $listCategory['description'] ) ); ?></b></p>
		</div>
	<?php endforeach; ?>

	<div class="clear"></div>
</div>

<a href="#" id="showAddCategoryDialog" >Nueva Carpeta</a>

<div style="display:none;" id="addCategoryDialog" title="Nueva Categoria">
	<?php
		echo $form -> create('Project', array( 'action' => 'addCategory' ));
		echo $form -> input('Category.name', array( 'label' => 'Nombre' ) );
		echo $form -> input('Category.description', array( 'label' => 'Descripcion' ) );
		echo $form -> input('Project.id', array( 'type' => 'hidden', 'value' => $listProject['Project']['id'] ) );
		echo $form -> end('Salvar');
	?>
</div>